package com.springboot.config;

import com.springboot.bean.Color;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;

/************************************************************************
 *
 *    Copyright  Copyright 2021 Google Inc.
 *    File Name: MyConfig
 *    Description: 描述
 *
 *    Version: V1.0
 *    Author: Fuc
 *    Create Time: 2021-01-13
 *
 *************************************************************************/

@Configuration
public class MyConfig {

  @Profile("prod")
  @Bean
  public Color red() {
    return new Color();
  }

  @Profile("test")
  @Bean
  public Color green() {
    return new Color();
  }
}
